import request from '@/utils/request'

// 创建用户积分记录
export function createScore(data) {
  return request({
    url: '/member/score/create',
    method: 'post',
    data: data
  })
}

// 更新用户积分记录
export function updateScore(data) {
  return request({
    url: '/member/score/update',
    method: 'put',
    data: data
  })
}

// 删除用户积分记录
export function deleteScore(id) {
  return request({
    url: '/member/score/delete?id=' + id,
    method: 'delete'
  })
}

// 获得用户积分记录
export function getScore(id) {
  return request({
    url: '/member/score/get?id=' + id,
    method: 'get'
  })
}

// 获得用户积分记录分页
export function getScorePage(query) {
  return request({
    url: '/member/score/page',
    method: 'get',
    params: query
  })
}

// 导出用户积分记录 Excel
export function exportScoreExcel(query) {
  return request({
    url: '/member/score/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
